const express = require('express');
const router = express.Router();
const Screen_handler = require("../../router_handler/screen/index");
const {verifyToken} = require("../../utils/JWT");

//获取文章数量
router.get("/articles", verifyToken, Screen_handler.getArticlesCount)
//查询评论数量
router.get('/comments', verifyToken, Screen_handler.getCommentsCount);
//查询用户数量
router.get('/user', verifyToken, Screen_handler.getAllUserCount);
// 查询访问次数
router.get("/ip", verifyToken, Screen_handler.countIPAddress)
//查询访问记录
router.get("/list", verifyToken, Screen_handler.getIpAddressList2)
//根据城市查询访问次数
router.get("/city", verifyToken, Screen_handler.getIpAddressListByCity)
// 按日期统计流量趋势
router.get("/date", verifyToken, Screen_handler.getIpAddressListByDate)
//按月份统计流量趋势
router.get("/month", verifyToken, Screen_handler.getIpAddressListByMonth)
// 按年份统计流量趋势
router.get("/year", verifyToken, Screen_handler.getIpAddressListByYear)
//查询点赞数
router.get('/commentlikes', verifyToken, Screen_handler.getCommentlikesCount)
//获取IP地址
module.exports = router;